/**
@author		Jong Min, Lee
@date		  02/06/2014
@brief		tool button class

copyright(c) Tae Young Soft. All right reserved. 2014
*/
#pragma once

#include "TAURUS_CTRL/EXButton.h"
#include "Taurus_ToolData/ToolData.h"
#include "Taurus_Util/Macros.h"

/**
@brief		tool button class
*/
class CToolButton : public CEXButton
{
public:
  /**
  @brief		default constructor
  */
  CToolButton();

  /**
  @brief		destructor
  */
  virtual ~CToolButton();

private:
  DISALLOW_COPY_AND_ASSIGN(CToolButton);

public:
  /**
  @brief		attach tool data to this button
  @param		pToolData pointer to tool data to be attached
  @return		ERROR_SUCCESS if succeeds, an error code otherwise
  */
  DWORD attachToolData(const CToolData* pToolData);

  /**
  @brief		detach tool data from this button
  @return		pointer to tool data that was attached to tool button
  */
  const CToolData* detachToolData();

  /**
  @brief		get attached tool data to tool button
  @return		pointer to tool data
  */
  inline const CToolData* getAttachedToolData() const
  {
    return m_pAttachedToolData;
  }

private:
  //pointer to attached tool data
  const CToolData* m_pAttachedToolData;

protected:
  DECLARE_MESSAGE_MAP()
};